<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateZzxjRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('zzxj_records', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id')->index()->default(0);
            $table->string('up_name')->nullable()->comment('上挂名称');
            $table->string('down_name')->nullable()->comment('下挂名称');
            $table->string('title')->nullable()->comment('本挂名称');
            $table->string('bian_title')->nullable()->comment('变卦名称');
            $table->string('yao_num')->nullable()->comment('变爻数');
            $table->unsignedInteger('dividend_id')->index();
            $table->unsignedInteger('by_dividend_id')->index();
            $table->text('bengsy')->nullable();
            $table->text('bianysy')->nullable();
            $table->text('biangsy')->nullable();
            $table->text('tag')->nullable();
            $table->text('content')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('zzxj_records');
    }
}
